package com.system.manager.modules.assit.controller;


import com.system.manager.common.annotation.Anonymous;
import com.system.manager.common.annotation.PreAuthorize;
import com.system.manager.common.entity.Result;
import com.system.manager.modules.assit.entity.ExpertType;
import com.system.manager.modules.assit.service.IExpertTypeService;
import com.system.manager.modules.authorized.enums.SubjectType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yxp
 * @since 2021-11-20
 */
@Api(tags = "专家类别API")
@RestController
@RequestMapping("/assit/expert/type")
public class ExpertTypeController {

    @Autowired
    private IExpertTypeService expertTypeService;

    @ApiOperation("获取专家类别")
//    @PreAuthorize(SubjectType.zx)
    @PreAuthorize(SubjectType.zx)
    @GetMapping("list")
    public Result selectExpertTypes(){

        List<ExpertType> list = expertTypeService.list();

        return Result.ok(list);
    }

}
